package cn.hs.common;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloWorldController {

    private static final Logger logger = LoggerFactory.getLogger(HelloWorldController.class);


    /**
     * 自动引用了 springboot 的logback，如果自定义的呢?
     * @return
     */
    @RequestMapping("/hello")
    public String index() {
        logger.info("请求 hello 方法 logger class {}",logger.getClass().getName());

        return "Hello World";
    }
}
